/* 传统论坛风格评论系统样式 */

/* 评论列表容器 */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

/* 评论项容器 */
.comment-line-box {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    /* 垂直布局，确保子评论在下方 */
    margin-bottom: 20px;
    width: 100%;
    padding: 0;
}

/* 根评论的主要内容布局 */
.comment-main-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
}

/* 评论列表项 */
.comment-list-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
}

/* 头像样式 */
.comment-line-box .el-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
}

/* 右侧内容区域 - 移除所有卡片样式 */
.right-box {
    flex: 1;
    background-color: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    position: relative;
}

/* 信息容器 */
.new-info-box {
    width: 100%;
}

.new-info-box .comment-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
    width: 100%;
}

/* 用户信息区域 */
.user-box {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

/* 折叠区域样式 */
.collapse-section {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    color: #666666;
    transition: all 0.2s ease;
    border-radius: 3px;
    margin-left: 6px;
    margin-right: 6px;
    padding: 2px 4px;
    border: 1px solid transparent;
}

.collapse-section:hover {
    color: #1890ff;
    background-color: #f0f9ff;
    border-color: #d9f2ff;
}

/* 折叠按钮图标样式 */
.collapse-btn {
    font-size: 14px;
    transition: transform 0.2s ease;
    font-weight: bold;
    margin-right: 4px;
}

/* 回复数量文字样式 */
.reply-count-text {
    font-size: 12px;
    color: inherit;
    user-select: none;
}

/* 子评论容器样式 */
.child-comments-container {
    margin-top: 10px;
    margin-left: 20px;
    /* 子评论容器缩进20px */
    background-color: transparent;
    border-radius: 0;
    padding: 0;
    border-left: none;
    width: calc(100% - 20px);
    /* 确保容器不超出父级宽度 */
}



/* 用户名样式 */
.comment-name {
    font-weight: 600;
    color: #333333;
    font-size: 14px;
    margin-right: 8px;
}

/* 作者标签样式 */
.el-tag {
    font-size: 12px;
    padding: 1px 6px;
    border-radius: 3px;
    margin-left: 6px;
    background-color: #ff4d4f;
    color: white;
    border: none;
}

/* 时间样式 */
.date {
    color: #999999;
    font-size: 12px;
    margin-left: 8px;
}

/* 回复文本和昵称 */
.text {
    color: #666666;
    font-size: 12px;
    margin: 0 4px;
}

.nick-name {
    color: #333333;
    font-size: 12px;
    font-weight: 500;
}

/* 回复数量显示 */
.reply-count {
    color: #1890ff;
    font-size: 12px;
    margin-left: 8px;
    padding: 2px 6px;
    background-color: #f0f9ff;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reply-count:hover {
    background-color: #e6f4ff;
}

/* 操作按钮区域 - 右对齐 */
.opt-comment {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 12px;
    color: #666666;
    margin-left: auto;
}

.opt-comment>span {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 2px 4px;
    border-radius: 3px;
}

.opt-comment>span:hover {
    color: #1890ff;
    background-color: #f0f9ff;
}

.opt-comment i {
    font-size: 12px;
    margin-right: 2px;
}

/* 评论内容区域 */
.comment-center {
    margin-top: 6px;
}

.new-comment {
    color: #333333;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
    margin: 0;
}

/* 子评论样式 */
.child-comment-list {
    margin: 0;
    padding: 0;
    position: relative;
    opacity: 1;
    transition: all 0.3s ease;
}

/* 在子评论容器内的子评论列表 */
.child-comments-container .child-comment-list {
    background-color: transparent;
    border-radius: 0;
    padding: 0;
    margin: 0;
    /* 移除额外padding，因为容器已经有margin-left了 */
}

/* 子评论层级线 */
.child-comments-container .child-comment-list::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: #e1e4e8;
}

.child-comment-list .comment-line-box {
    margin-bottom: 15px;
    position: relative;
}

/* 子评论连接线 */
.child-comments-container .child-comment-list .comment-line-box::before {
    content: '';
    position: absolute;
    left: -32px;
    top: 20px;
    width: 12px;
    height: 1px;
    background-color: #e1e4e8;
}

/* 移除子评论的特殊背景和边框 */
.child-comment-list .right-box {
    background-color: transparent;
    border: none;
}

/* 回复输入框样式 */
.replay-input-box {
    margin-top: 10px;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.reply-header {
    margin-bottom: 8px;
}

.reply-to {
    color: #666;
    font-size: 12px;
    background-color: #e3f2fd;
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
}

.reply-input-area {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.reply-input-area .el-textarea {
    width: 100%;
}

.reply-input-area .el-textarea .el-textarea__inner {
    border-radius: 4px;
    border: 1px solid #ddd;
    padding: 8px;
    font-size: 13px;
    line-height: 1.4;
}

.reply-input-area .el-textarea .el-textarea__inner:focus {
    border-color: #409eff;
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.1);
}

.reply-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* 主评论输入区域样式 */
.comment-input-section {
    padding: 16px;
    width: 100%;
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.comment-input-header {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.comment-input-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.comment-input {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-input .el-textarea .el-textarea__inner {
    border-radius: 6px;
    border: 1px solid #ddd;
    padding: 12px;
    font-size: 14px;
    line-height: 1.5;
    resize: none;
    transition: border-color 0.3s ease;
}

.comment-input .el-textarea .el-textarea__inner:focus {
    border-color: #409eff;
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.1);
}

.comment-input-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .comment-input-section {
        margin-top: 15px;
        padding: 12px;
    }

    .comment-input-header h4 {
        font-size: 14px;
    }

    .comment-input .el-textarea .el-textarea__inner {
        padding: 10px;
        font-size: 13px;
    }
}

/* 回复关系样式 */
.reply-to {
    font-size: 12px;
    color: #333333;
    font-weight: 500;
}

/* 折叠动画 */
.child-comment-list.collapsed {
    opacity: 0;
    height: 0;
    overflow: hidden;
    margin-top: 0;
    padding-left: 0;
}

/* 展开动画 */
@keyframes expandComment {
    from {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
    }

    to {
        opacity: 1;
        max-height: 1000px;
        padding-top: 15px;
    }
}

.child-comment-list.expanded {
    animation: expandComment 0.3s ease forwards;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .comment-line-box {
        gap: 10px;
        margin-bottom: 15px;
    }

    .comment-line-box .el-avatar {
        width: 35px;
        height: 35px;
    }

    .child-comments-container {
        margin-left: 15px;
        width: calc(100% - 15px);
    }

    .child-comments-container .child-comment-list::before {
        left: 17px;
    }

    .child-comments-container .child-comment-list .comment-line-box::before {
        left: -28px;
    }

    .new-info-box .comment-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .opt-comment {
        margin-left: 0;
        margin-top: 5px;
    }

    .collapse-section {
        padding: 1px 3px;
        margin-left: 4px;
        margin-right: 4px;
    }

    .collapse-btn {
        font-size: 10px;
    }

    .reply-count-text {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .child-comments-container {
        margin-left: 10px;
        width: calc(100% - 10px);
    }

    .child-comments-container .child-comment-list::before {
        left: 12px;
    }

    .child-comments-container .child-comment-list .comment-line-box::before {
        left: -23px;
    }

    .comment-name {
        font-size: 13px;
    }

    .new-comment {
        font-size: 13px;
    }

    .opt-comment {
        gap: 10px;
    }

    .reply-count {
        font-size: 11px;
    }
}